package com.realife.eson.common.util.jwt;

import java.util.Date;

/**
 * @version V1.0
 * @author: guangcheng
 * @date: 2022/4/14 16:12
 * @description:
 */
public interface ITokenServer {
    ICoreJWTInfo getInfoFromTokenCore(String var1) throws Exception;

    ITokenInfo getInfoFromToken(String var1) throws Exception;

    String generateTokenCore(ICoreJWTInfo var1) throws Exception;

    String generateToken(ITokenInfo var1) throws Exception;

    ITokenInfo getInfoFromTokenByJwt(String var1) throws Exception;

    default int calExpireMinutes(Date time) {
        return (int)((time.getTime() - System.currentTimeMillis()) / 1000L);
    }
}
